package com.googlecode.moneyManager.dao.hib;



import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.googlecode.moneyManager.dao.GenericDAO;
import com.googlecode.moneyManager.model.Address;
import com.googlecode.moneyManager.utils.Assert;

/**
* @author Sergiy Doroshenko
 *
 * impeded for a while @date 18.05.2011
 * working version
**/
public class AddressDAOHib extends HibernateDaoSupport implements GenericDAO<Address>{

    public void delete(Address a) throws DataAccessException {
        Assert.notNull(a, "address to delete must not be null");
        this.getHibernateTemplate().delete(a);
    }


    public Address get(Long id) throws DataAccessException {
        Assert.notNull(id, "address id to get must not be null");
        return this.getHibernateTemplate().get(Address.class, id);
    }



    public void merge(Address a) throws DataAccessException {
        Assert.notNull(a, "address to update must not be null");
        getHibernateTemplate().merge(a);
    }


    public void saveOrUpdate(Address a) throws DataAccessException {
        Assert.notNull(a, "address to update must not be null");
        getHibernateTemplate().saveOrUpdate(a);
    }


    public Address get(String id) throws DataAccessException {
	return null;
    }


    public List<Address> getAll() throws DataAccessException {
	return null;
    }


    public String create(Address t) throws DataAccessException {
	return null;
    }

}